package StudyCode.summary.regularexpressionsmatch;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CompilingAPatternWithMultipleFlags {
	public static void main(String[] args) {
		CharSequence inputStr = "Abc\ndef";
		String patternStr = "abc$";

		Pattern pattern = Pattern.compile(patternStr, Pattern.MULTILINE
				| Pattern.CASE_INSENSITIVE);
		Matcher matcher = pattern.matcher(inputStr);
		boolean matchFound = matcher.find(); // true
		System.out.println("匹配结果: " + matchFound);
	}
}
